how to print string plus variable in php

114

$variableName = 'Ralph';
echo 'Hello '.$variableName.'!';
<?php
$a = "Hello ";
$b = $a . "World!"; // now $b contains "Hello World!"

$a = "Hello ";
$a .= "World!";     // now $a contains "Hello World!"
?>

Comments

Submit
0 Comments